import localKey from './localKey'


//  正式服部署
// const devApiUrl = 'http://192.168.0.88:8082';            //本地开发环境
const devApiUrl = 'http://192.168.0.77:8081';               //本地开发环境
const buildDevApiUrl = 'http://49.235.128.144:8081';        //打包开发环境
const buildTestApiUrl ='http://49.235.128.144:8081';        //打包测试环境
const buildProApiUrl = 'http://49.235.128.144:8081';        //打包正式环境


let useApiUrl;

switch (process.env.NODE_ENV) {
    case 'development':
        useApiUrl = devApiUrl;
        break;
    case 'buildDev':
        useApiUrl = buildDevApiUrl;
        break;
    case 'buildTest':
        useApiUrl = buildTestApiUrl;
        break;
    case 'production':
        useApiUrl = buildProApiUrl;
        break;
}

export default {

    nodeDevEnv: process.env.NODE_ENV === 'development',
    apiUrl: useApiUrl,
    minSiteMame: 'EUI',
    apiPrefix: "",
    timeout: 5000,
    cookiesExpires: 7,
    requestRetry: 0,
    requestRetryDelay: 800,
    tokenKey: 'ACCESS_TOKEN',
    userInfoKey: 'USER_INFO',
    permissionsKey: 'PERMISSION_ARRAY',
    ...localKey
}
